//
//  ApiServer.m
//  ObjcGoNew
//
//  Created by 邢伟新 on 2021/4/16.
//

#import "ApiServer.h"
#import <AFNetworking/AFNetworking.h>

@implementation ApiServer


+(void)GeiWanApiSuccess:(void (^)( NSDictionary *resultDic))success
                failure:(void (^)( NSError* error))failure{
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    NSURLSessionDataTask *task = [manager GET:@"https://www.wanandroid.com/article/list/1/json" parameters:nil headers:nil progress:^(NSProgress * _Nonnull downloadProgress) {
        
    } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        
        NSDictionary *dic = @{@"key":@"value"};
        success(dic);
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
        failure(error);
    }];
    
    [task resume];
    
    
    
    
}


@end
